<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>测试页面</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
</head>
<body>
<div id="app">
    <template>
        <el-table
                :data="tableData"
                style="width: 100%"
                :row-class-name="tableRowClassName">
          <el-table-column
                  prop="jobName"
                  label="兼职名称">
          </el-table-column>
          <el-table-column
                prop="signTime"
                label="报名日期"
                width="180">
        </el-table-column>
            <el-table-column
                    prop="name"
                    label="企业名称"
                    width="180">
            </el-table-column>
            <el-table-column
                    prop="signCondition"
                    label="录取状态">
            </el-table-column>
          <el-table-column
                  prop="adimissionTime"
                  label="录取日期"
                  width="180">
          </el-table-column>
            <el-table-column
                    fixed="right"
                    label="操作"
                    width="100">
                <template slot-scope="scope">
<!--                  <el-button @click="handleClick(scope.row)" szie="small" icon="el-icon-search" circle></el-button>-->
<!--                  <el-button type="danger" szie="small" icon="el-icon-delete" circle></el-button>-->
                  <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
                  <el-button type="text" size="small">取消</el-button>
                </template>
            </el-table-column>
        </el-table>

    </template>

</div>
<style>
    .el-table .warning-row {
        background: oldlace;
    }

    .el-table .success-row {
        background: #f0f9eb;
    }
</style>

<script src="js/vue.js"></script>
<script src="js/axios.js"></script>
<script src="https://unpkg.com/element-ui@2.15.1/lib/index.js"></script>
<script>
    new Vue({
        el: '#app',
        methods: {
            tableRowClassName({row, rowIndex}) {
                console.log(row)
                if (row.name == '王虎') {
                    return 'warning-row';
                } else if (rowIndex === 3) {
                    return 'success-row';
                }
                return '';
            },
            handleClick(row) {
                console.log(row);
            },
            deleteJob(id){
                axios.delete('http://localhost:8001//service_job/sign-stu/delete/id').then(res=>{

                })
            }
        },
        data() {
            return {
                tableData: [{
                    date: '2016-05-02',
                    name: '王虎',
                    address: '上海市普陀区金沙江路 1518 弄',
                }, {
                    date: '2016-05-04',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1518 弄'
                }, {
                    date: '2016-05-01',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1518 弄',
                }, {
                    date: '2016-05-03',
                    name: '王小虎',
                    address: '上海市普陀区金沙江路 1518 弄'
                }],
              signJobs:''
            }
        }

    })
</script>
</body>
</html>